#
# Page.py
# (c) 2008 Will Baker.
#

from PyQt4.QtCore import Qt
from PyQt4.QtGui import QPixmap

class Page:
    """
    A single page in a Comic.
    """
    def __init__( self, index, data ):
        self.index = index
        self.image = QPixmap()
        self.image.loadFromData( data )
        
        if not self.image.isNull():
            self.thumbnail = self.image.scaledToHeight( 140, Qt.SmoothTransformation )
        else:
            self.thumbnail = QPixmap()
